cmake_minimum_required( VERSION 3.5.1)

if(NOT CMAKE_PREFIX_PATH)
    message(FATAL_ERROR "CMAKE_PREFIX_PATH is not set. Please set it using -DCMAKE_PREFIX_PATH=<path>")
else()
    message(STATUS "CMAKE_PREFIX_PATH is set to: ${CMAKE_PREFIX_PATH}")
endif()

message(STATUS "Qt SDK dir: " $ENV{QT5_DIR})
find_package(Qt5 COMPONENTS Core Network REQUIRED)
# Include Qt headers
include_directories(
    $ENV{QT5_DIR}/include
    $ENV{QT5_DIR}/include/QtCore
    $ENV{QT5_DIR}/include/QtNetwork
)

# Link Qt5 libraries
# target_link_libraries(${PROJECT_NAME} Qt5::Core Qt5::Network)